www.gusucode.com > 环保时代家庭财务管理系统 EPffms v4.0 > 环保时代家庭财务管理系统 EPffms v4.0\code\eptimehome\diary\index.asp

    <!-- #include file="../conn.asp" -->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="../images/admin.css" rel="stylesheet" type="text/css" />
<title>无标题文档</title>
<script>
function test()
{
if(!confirm('确认删除本信息吗?')) return false;
}
</script>
 <script language="javascript">
<!--
function check(){
 var notnull;
 notnull=true;
 if (document.form1.content.value==""){
  alert("请输入回复的内容");
  document.form1.content.focus();
  notnull=false;
  }
                        
 return notnull;
 }

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>

<body>
<!--当前导航-->
<script type="text/JavaScript">if(parent.$('admincpnav')) parent.$('admincpnav').innerHTML='首页&nbsp;&raquo;&nbsp;理财日记&nbsp;&raquo;&nbsp;公开日记';</script>    
<%
set rs = server.CreateObject("adodb.recordset")
if request.QueryString("act") = "showlist" then
Dim str
	  select case request.QueryString("class")
	      case ""
		    str = "EP_id desc"
		  case "timed"
		    str = "EP_date desc"
		  case "timea"
		    str = "EP_date asc"			
	  end select
	  
%>
<form id="form2" name="form2" method="post" action="?act=all">
  <table width="800" height="40" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td width="120" align="center" height="40">&nbsp;</td>
      <td width="580" align="center" style="font-size:14px;color:#009900;font-weight:bold;">公 开 理 财 日 记 列 表</td>
      <td width="100" align="center" ><select name="menu1" class="font_heise_12" onchange="MM_jumpMenu('self',this,0)">
        <option value="请选择">请选择</option>
        <option value="?act=showlist&class=timed">按发表时间降序排序</option>
        <option value="?act=showlist&class=timea">按发表时间升序排序</option>
            </select></td>
    </tr>
  </table>
  <table width="800" height="60" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#3399CC" class="font_bg">
    <tr >
      <td width="10%" height="30" align="center" style="font-size:14px;color:#009900;">ID</td>
      <td width="64%" align="center" style="font-size:14px;color:#009900;">标题</td>
      <td width="16%" align="center" style="font-size:14px;color:#009900;">日期</td>
	  <td width="10%" align="center" style="font-size:14px;color:#009900;">作者</td>
    </tr>
    <%
	  EP_Sql = "select * from Eptime_diary where ep_ok=1 order by " &  str
	  rs.open EP_sql ,conn,1,1
	  if rs.eof then  response.Write("暂无记录,请添加"):response.End()
			   if request("page") <> "" then
	        page=clng(request("page"))
			else
			page = 0
			end if
            rs.PageSize=10
            if page=0 then page=1 
            pages=rs.pagecount
            if page > pages then page=pages
            rs.AbsolutePage=page
			for j =1 to rs.pagesize
	%>
    <tr>
      <td height="30" align="center" class="font_heise_12"><%=rs("EP_id")%></td>
      <td align="left" id="Eptime_diary1">&nbsp;&nbsp;<%
	 if  len(rs("EP_title")) > 15 then
	  response.Write("<a href='list.asp?id="& rs("EP_id") &"'>" & left(rs("EP_title"),15) & "...</a>")
	 else
	   response.Write("<a href='list.asp?id="& rs("EP_id") &"'>" & rs("EP_title") & "</a>")
	 end if 
	  %></td>
      <td align="center" class="font_heise_12"><%=rs("EP_date")%></td>
<td align="center" class="font_heise_12">
<%
	  sql="select * from Eptime_admin where id="&rs("ep_author")
	  set rs_login=conn.execute(sql)
%>
	  <%if rs_login.eof then%><%=rs("ep_author")%><%else%><%=rs_login("realname")%><%end if%></td>
    </tr>
    <%
	rs.movenext
	if rs.eof then exit for
	next
	%>
    <tr>
      <td colspan="4" align="center" height="30"><a href="?act=showlist&amp;page=1">首页</a>&nbsp; <a href="?act=showlist&amp;page=<%=page-1%>">上一页</a> &nbsp;
        <%
	  for i=1 to rs.pagecount
	   response.Write("<a href='?act=showlist&page="& i &"'>" & i & "</a>" & "&nbsp;")
	  next
	  %>
&nbsp;<a href="?act=showlist&amp;page=<%=page+1%>">下一页</a>&nbsp; <a href="?act=showlist&amp;page=<%=rs.pagecount%>">尾页</a>      </td>
    </tr>
  </table>
</form>
<%  
end if
Call closeconn()

sub closeconn()
  conn.close()
  set conn =nothing
end Sub
Sub showmessage(LX_str,LX_address)
   Response.Write("<script>alert('"& LX_str &"');location.href='"& LX_address &"'</script>")
End Sub
%>
</body>
</html>